<?php get_header(); ?>
  <div id="content">
    <div class="postwrap">
      <?php if (have_posts()) : ?>
      <?php while (have_posts()) : the_post(); ?>
      <div class="post" id="post-<?php the_ID(); ?>">
        <div class="posthead">
          <h1>
            <?php the_title(); ?>
          </h1>
          <small class="postauthor">Posted by
          <?php the_author() ?>
          <?php edit_post_link('Edit'); ?>
          </small>
          <p class="postdate"> <small class="month">
            <?php the_time('M') ?>
            </small> <small class="day">
            <?php the_time('j') ?>
            </small> </p>
        </div>
        <div class="postcontent">
          <?php the_content('Read the rest of this entry'); ?>
        </div>
        <div class="postinfo">
          <li class="singlepostcat">Filed under:
            <?php the_category(', ') ?>
          </li>
          <div class="clearer"></div>
        </div>
      </div>
      <br clear="all" />
      <?php
if (function_exists('similar_posts')) {
echo ('<h4>Related Posts</h4><div class="rel-posts">');
similar_posts();
echo ('</div>');
}
?>
      <ul class="Note">
        <li class="NoteRss">
          <?php comments_rss_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post')); ?>
        </li>
        <?php if ( pings_open() ) : ?>
        <li class="NoteTrackBack"><a href="<?php trackback_url() ?>" rel="trackback">
          <?php _e('TrackBack <abbr title="Uniform Resource Identifier">URI</abbr>'); ?>
          </a></li>
      </ul>
      <?php endif; ?>
      <?php comments_template(); ?>
      <?php endwhile; else : ?>
      <h2>
        <?php _e('Not Found'); ?>
      </h2>
      <p>
        <?php _e('Sorry, but the page you requested cannot be found.'); ?>
      </p>
      <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
  </div>
  <?php get_footer(); ?>
